package javashiyanbaogao;
class Clock {
    private int hour;
    private int minute;
    private int second;

    public Clock(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }

    public void show() {
        System.out.printf("%02d:%02d:%02d\n", hour, minute, second);
    }
}
public class Test {
    public static void main(String[] args) {
        // 创建多个时钟类的对象
        Clock clock1 = new Clock(12, 30, 45);
        Clock clock2 = new Clock(8, 15, 30);
        Clock clock3 = new Clock(23, 59, 59);
        clock1.show();
        clock2.show();
        clock3.show();
    }
}
